<?php
/**
 * +-------------------------------------------------------------
 * |Caption:
 * +-------------------------------------------------------------
 * |Author: Lenny
 * +-------------------------------------------------------------
 * |Email:  1685964109@qq.com
 * +-------------------------------------------------------------
 * |Date:   2024/6/22 上午9:11
 * +-------------------------------------------------------------
 */

namespace app\admin\validate;

use think\Validate;

class SysMenuValidate extends Validate
{

    protected $rule = [
            'title'  => 'require',
            'target' => 'require',
            'pid'    => 'require',
            'type'   => 'require',
    ];

    protected $message = [
            'title.require'  => '菜单名称不能为空',
            'target.require' => 'target属性不能为空',
            'pid.require'    => '父级ID不能为空',
            'type.require'   => '类型不能为空',
        ];


    protected $scene = [
            'add' => ['title', 'target', 'pid', 'type']
    ];
}